#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <event.h>
#include "common.h"
#include <errno.h>

typedef struct _conn{
	struct event ev;
	char http_header[4096];
	char buf[4096];
	int http_len;
	int buf_size;
	int udp_fd;
	struct sockaddr_in client_addr;
	char http_url[1024];
}conn;
int client_socket(const char *ip,const int port);
void http_write(int sockfd,short event,void *arg);
void http_read(int sockfd,short event,void *arg);
